[IA64] Support for multiple I/O port spaces
Linux has support for multiple I/O port spaces on a system. Depending
on the system configuration, this might allow for 64k of I/O port space
per PCI bus. The "extended" I/O port ranges are described to the OS by
_CRS methods on PCI root devices in ACPI namespace. For instance, on my
system, /proc/iomem shows several entries like these:
80000000000-
80003ffffff : PCI Bus 0000:00 I/O Ports
01000000-
0100ffff
80100000000-
80103ffffff : PCI Bus 0000:01 I/O Ports
02000000-
0200ffff
80200000000-
80203ffffff : PCI Bus 0000:0a I/O Ports
03000000-
0300ffff
80300000000-
80303ffffff : PCI Bus 0000:0f I/O Ports
04000000-
0400ffff
...
These describe MMIO ranges that provide I/O port ranges per PCI bus.
My /proc/ioports then shows entries like these:
01000000-
0100ffff : PCI Bus 0000:00
01001000-
010010ff : 0000:00:04.0
02000000-
0200ffff : PCI Bus 0000:01
02001000-
02001fff : PCI Bus #02
02001000-
0200107f : 0000:02:07.0
02001000-
0200107f : tulip
02001080-
020010ff : 0000:02:06.0
02001080-
020010ff : tulip
02001100-
0200117f : 0000:02:05.0
02001180-
020011ff : 0000:02:04.0
02001180-
020011ff : tulip
02002000-
0200203f : 0000:01:02.1
02002040-
0200207f : 0000:01:02.0
02002040-
0200207f : e1000
03000000-
0300ffff : PCI Bus 0000:0a
...
Xen currently has no concept of these extended I/O port space ranges and
prevents dom0 from doing the MMIO transactions required to access these
ports. This patch solves the problem. First we need to make
ioports_permit/deny_access() aware that multiple I/O port ranges with
different MMIO base address exist. Next we need to provide a mechanism
to register new I/O port spaces, for this I've created the dom0vp op
IA64_DOM0VP_add_io_space. This allows dom0 to do the work of finding
the ranges in ACPI namespace since we don't want to add that kind of
bulk to Xen. Finally, dom0 needs to make use of this interface when new
ranges are found.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>